package net.lovesrc.allin.biz.stl;

import lombok.Getter;

@Getter
public enum StlKjKind {

    //贺岁福猪(9, "贺岁福猪", 1, 1, false),
    //掘金(6, "掘金矿机", 2, 1000000, false),
    //空投(7, "空投矿机", 2, 1, false),
    中型(2, "中型矿机", 60, 100, true),
    大型(3, "大型矿机", 10, 1000, true),
    //巨型(4, "巨型矿机", 2, 5000, false),
    小型(1, "小型矿机", 0, 10, false);

    private int id;

    private String name;

    private int maxQty;

    private int price;

    private boolean unlimitedRunning;

    StlKjKind(int id, String name, int maxQty, int price, boolean unlimitedRunning) {
        this.id = id;
        this.name = name;
        this.maxQty = maxQty;
        this.price = price;
        this.unlimitedRunning = unlimitedRunning;
    }

    public StlKjKind ofName(String name) {
        for (StlKjKind kjKind : StlKjKind.values()) {
            if (name.contains(kjKind.getName())) {
                return kjKind;
            }
        }
        return null;
    }

}
